home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / libelf / elf_flag.z / elf_flag
Encoding:
Text File  |  2002-10-03  |  4.7 KB  |  85 lines

  1. ELF_FLAG(3E)                                         Last changed: 10-13-98
  2.  
  3.  
  4. NNAAMMEE
  5.      eellff__ffllaaggddaattaa, eellff__ffllaaggeehhddrr, eellff__ffllaaggeellff, eellff__ffllaaggpphhddrr, eellff__ffllaaggssccnn,
  6.      eellff__ffllaaggsshhddrr - Manipulates flags
  7.  
  8. SSYYNNOOPPSSIISS
  9.      cccc [_f_l_a_g ...] _f_i_l_e ...  --lleellff [_l_i_b_r_a_r_y ...]
  10.  
  11.      ##iinncclluuddee <<lliibbeellff..hh>>
  12.  
  13.      uunnssiiggnneedd eellff__ffllaaggddaattaa((EEllff__DDaattaa **ddaattaa,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  14.  
  15.      uunnssiiggnneedd eellff__ffllaaggeehhddrr((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  16.  
  17.      uunnssiiggnneedd eellff__ffllaaggeellff((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  18.  
  19.      uunnssiiggnneedd eellff__ffllaaggpphhddrr((EEllff **eellff,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  20.  
  21.      uunnssiiggnneedd eellff__ffllaaggssccnn((EEllff__SSccnn **ssccnn,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  22.  
  23.      uunnssiiggnneedd eellff__ffllaaggsshhddrr((EEllff__SSccnn **ssccnn,, EEllff__CCmmdd ccmmdd,, uunnssiiggnneedd ffllaaggss));;
  24.  
  25. IIMMPPLLEEMMEENNTTAATTIIOONN
  26.      IRIX systems
  27.  
  28. DDEESSCCRRIIPPTTIIOONN
  29.      These functions manipulate the flags associated with various
  30.      structures of an ELF file.  Given an ELF descriptor (eellff), a data
  31.      descriptor (ddaattaa), or a section descriptor (ssccnn), the functions may
  32.      set or clear the associated status bits, returning the updated bits.
  33.      A null descriptor is allowed, to simplify error handling; all
  34.      functions return zero for this degenerate case.
  35.  
  36.      ccmmdd may have the following values:
  37.  
  38.      EELLFF__CC__CCLLRR         The functions clear the bits that are asserted in
  39.                        ffllaaggss.  Only the non-zero bits in ffllaaggss are cleared;
  40.                        zero bits do not change the status of the
  41.                        descriptor.
  42.  
  43.      EELLFF__CC__SSEETT         The functions set the bits that are asserted in
  44.                        ffllaaggss.  Only the non-zero bits in ffllaaggss are set;
  45.                        zero bits do not change the status of the
  46.                        descriptor.
  47.  
  48.      The following are descriptions of the defined ffllaaggss bits:
  49.  
  50.      EELLFF__FF__DDIIRRTTYY       When the program intends to write an ELF file, this
  51.                        flag asserts the associated information that must be
  52.                        written to the file.  For example, if a program is
  53.                        to update the ELF header of an existing file, it
  54.                        would call eellff__ffllaaggeehhddrr with this bit set in ffllaaggss
  55.                        and ccmmdd equal to EELLFF__CC__SSEETT.  A later call to
  56.                        eellff__uuppddaattee would write the marked header to the
  57.                        file.
  58.  
  59.      EELLFF__FF__LLAAYYOOUUTT      Usually, the library decides how to arrange an
  60.                        output file.  That is, it automatically decides
  61.                        where to place sections, how to align them in the
  62.                        file, etc.  If this bit is set for an ELF
  63.                        descriptor, the program determines all file
  64.                        positions.  This bit is meaningful only for
  65.                        eellff__ffllaaggeellff and applies to the entire file
  66.                        associated with the descriptor.
  67.  
  68.      When a flag bit is set for an item, it affects all the subitems as
  69.      well.  For example, if the program sets the EELLFF__FF__DDIIRRTTYY bit with
  70.      eellff__ffllaaggeellff, the entire logical file is ``dirty.''
  71.  
  72. EEXXAAMMPPLLEESS
  73.      The following fragment shows how one might mark the ELF header to be
  74.      written to the output file.
  75.  
  76.           ehdr = elf32_getehdr(elf);
  77.           /* dirty ehdr ... */
  78.           elf_flagehdr(elf, ELF_C_SET, ELF_F_DIRTY);
  79.  
  80. SSEEEE AALLSSOO
  81.      eellff(3E), eellff__eenndd(3E), eellff__ggeettddaattaa(3E), eellff__ggeetteehhddrr(3E), eellff__uuppddaattee(3E)
  82.  
  83.      This man page is available only online.
  84.  
  85.